import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home.vue";

import Login from "@/views/Login";

Vue.use(VueRouter);

const routes = [
  {
    path: "/login",
    name: "Login",
    component: Login,
    meta: {
      title: "登录"
    }
  },

  {
    path: "/",
    name: "Home",
    component: Home
  },
  {
    path: "/first",
    name: "First",
    meta: {
      title: "首页"
    },
    component: () => import("@/views/First")
  }
];

const router = new VueRouter({
  routes
});

export default router;
